<?php
session_start();
$username = "";
if (isset($_SESSION['username']) && isset($_SESSION['isadmin']) && $_SESSION['isadmin'] == 1) {
    $username = $_SESSION['username'];
} else {
    echo json_encode(['Code' => 401, 'Msg' => '未登录', 'Ret' => "False"], JSON_UNESCAPED_UNICODE);
    exit();
    return;
}
// 将用户名返回给调用者
return $username;
